package com.itheima.HomeWork.homework;

public class Yingxiong {
    private String name;
    private String sc;
    private String gj;
    private String xg;
    private double jk;

    public Yingxiong() {
    }

    public Yingxiong(String name, String sc, String gj, String xg) {
        this.name = name;
        this.sc = sc;
        this.gj = gj;
        this.xg = xg;
        setJk();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSc() {
        return sc;
    }

    public void setSc(String sc) {
        this.sc = sc;
    }

    public String getGj() {
        return gj;
    }

    public void setGj(String gj) {
        this.gj = gj;
    }

    public String getXg() {
        return xg;
    }

    public void setXg(String xg) {
        this.xg = xg;
    }

    public double getJk() {
        return jk;
    }

    public void setJk() {
        this.jk = Integer.parseInt(sc)*0.5+Integer.parseInt(gj)*0.2+Integer.parseInt(xg)*0.3;
    }

    @Override
    public String toString() {
        return "Yingxiong{" +
                "name='" + name + '\'' +
                ", sc='" + sc + '\'' +
                ", gj='" + gj + '\'' +
                ", xg='" + xg + '\'' +
                ", jk=" + jk +
                '}';
    }
}
